package com.xiaoc.bulldozer.common.service.impl;

import java.util.List;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xiaoc.bulldozer.common.dao.AwardProductMapper;
import com.xiaoc.bulldozer.common.dto.AwardProductQueryDto;
import com.xiaoc.bulldozer.common.model.AwardProduct;
import com.xiaoc.bulldozer.common.service.AwardProductService;

/**
 * AwardProduct Service 实现类
 * 
 * @author Danfo Yam
 * 
 * @date 2018-08-24 15:47:58
 */
@Service("awardProductService")
public class AwardProductServiceImpl implements AwardProductService {

    @Resource
    private AwardProductMapper awardProductMapper;

    @Override
    public Integer getAwardProductCountByCondition(AwardProductQueryDto awardProductQueryDto) {
        return awardProductMapper.getAwardProductCountByCondition(awardProductQueryDto);
    }

    @Override
    public List<AwardProduct> getAwardProductListByCondition(AwardProductQueryDto awardProductQueryDto) {
        awardProductQueryDto.setPage(awardProductQueryDto.getPage());
        return awardProductMapper.getAwardProductListByCondition(awardProductQueryDto);
    }

    @Override
    public AwardProduct getAwardProductById(Integer id) {
        return awardProductMapper.getAwardProductById(id);
    }

    @Override
    public List<AwardProduct> getAllAwardProductList() {
        return awardProductMapper.getAllAwardProductList();
    }
    
    @Override
    public void save(AwardProduct awardProduct) {
        awardProductMapper.save(awardProduct);
    }

    @Override
    public void update(AwardProduct awardProduct) {
        awardProductMapper.update(awardProduct);
    }

    @Override
    public void deleteById(Integer id) {
        awardProductMapper.deleteById(id);
    }

    @Override
    public AwardProduct getAwardProductByStatus(Integer status) {
        return awardProductMapper.getAwardProductByStatus(status);
    }
}
